﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MTQ.Web.Controllers
{
    public class SyncDBController : Controller
    {
        //
        // GET: /SyncDB/

        public ActionResult Index()
        {
            try
            {
               // BLL.BusinessServices.SyncData syncdata = new BLL.BusinessServices.SyncData();

                DateTime dt = System.DateTime.Now;
                string date = Request.QueryString["date"];
                if (!string.IsNullOrEmpty(date))
                {
                    dt = Convert.ToDateTime(date);
                }
                else {
                    dt = System.DateTime.Now;
                }
               
                //syncdata.CreateTable(dt);
                //syncdata.Sync(dt);

                ViewBag.Result = "成功";
            }
            catch(Exception e) {
                 ViewBag.Result = "失败";
            }
           
            return View();
        }

    }
}
